import request from '@/utils/request'

// 查询转移单据 列表
export function listShift(query) {
  return request({
    url: '/activiti/shift/list',
    method: 'get',
    params: query
  })
}

// 查询当前部门转移单据 列表
export function listAllShift(query) {
  return request({
    url: '/activiti/shift/listAll',
    method: 'get',
    params: query
  })
}

// 查询转移单据 详细
export function getShift(shiftId) {
  return request({
    url: '/activiti/shift/' + shiftId,
    method: 'get'
  })
}

// 新增转移单据
export function addShift(data) {
  return request({
    url: '/activiti/shift',
    method: 'post',
    data: data
  })
}

// 撤回出入库单据
export function revoke(businessKey) {
  return request({
    url: '/activiti/shift/revoke',
    method: 'post',
    data: businessKey
  })
}

// 修改转移单据
export function updateShift(data) {
  return request({
    url: '/activiti/shift',
    method: 'put',
    data: data
  })
}

// 删除转移单据
export function delShift(shiftId) {
  return request({
    url: '/activiti/shift/' + shiftId,
    method: 'delete'
  })
}

// 导出转移单据
export function exportShift(query) {
  return request({
    url: '/activiti/shift/export',
    method: 'get',
    params: query
  })
}
